home *** CD-ROM | disk | FTP | other *** search
- /* close.c --- p 486 */
- #include <stdio.h>
- #include <io.h>
- main()
- {
- /* Call close with an invalid file handle. Handles 0
- * thru 4 are in use by stdin, stdout, stderr, stdaux
- * and stdprn. So, let's use handle 5. */
- printf("Attempting to close file handle 5...\n");
- if ( close(5) != 0)
- perror("Close failed");
- }